<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- head 中 -->
    <link rel="stylesheet" href="css/materialize.min.css">

    

    <title>H5 网页示例</title>

    <style>
        #title{
            color: #fb8c00;
        }

    </style>

</head>
<body style="margin-left: 10px;margin-right: 10px">

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>日语语法测试</title>
    <style>

        .quiz-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 50px;
        }

        .question-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            border: 2px solid black;
            max-width: 600px;
            margin-bottom: 30px;
        }

        .header {
            margin-bottom: 20px;
        }

        h1 {
            font-size: 36px;
            text-align: center;
        }

        p {
            font-size: 20px;
            margin-bottom: 30px;
        }

        .answer-options {
            display: flex;
            flex-direction: column;
        }

        .answer-options input[type=radio] {
            margin-right: 10px;
        }

        .submit-button-container {
            margin-top: 50px;
        }

        #submit-button {
            font-size: 20px;
            padding: 10px 20px;
            border: none;
            background-color: black;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        #submit-button:hover {
            background-color: white;
            color: black;
        }

        .result-container {
            margin-top: 50px;
            text-align: center;
        }

        span#result {
            font-weight: bold;
            font-size: 24px;
            padding: 0 10px;
        }



    </style>
</head>
<body>

<div class="quiz-container">
    <div class="question-container">
        <div class="header">
            <h1>问题一</h1>
        </div>
        <p>その当時の【記憶】はあまりない。</p>
        <div class="answer-options">
            <input type="radio" id="a" name="answer1" value="a">
            <label for="a">A. きりよく</label><br>
            <input type="radio" id="b" name="answer1" value="b">
            <label for="b">B. きよく</label><br>
            <input type="radio" id="c" name="answer1" value="c">
            <label for="c">C. きろく</label><br>
            <input type="radio" id="d" name="answer1" value="d">
            <label for="d">D. きおく</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二</h1>
        </div>
        <p>前田さんがそんなに【偉い】人だとは知りませんでした。</p>
        <div class="answer-options">
            <input type="radio" id="e" name="answer2" value="e">
            <label for="e">A. かしこい</label><br>
            <input type="radio" id="f" name="answer2" value="f">
            <label for="f">B. えらい</label><br>
            <input type="radio" id="g" name="answer2" value="g">
            <label for="g">C. すごい</label><br>
            <input type="radio" id="h" name="answer2" value="h">
            <label for="h">D. するどい</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题三</h1>
        </div>
        <p>私が仕事の話を始めたら、【涂端に】西川さんの機嫌が悪くなった。</p>
        <div class="answer-options">
            <input type="radio" id="i" name="answer3" value="i">
            <label for="i">A. とたんに</label><br>
            <input type="radio" id="j" name="answer3" value="j">
            <label for="j">B. よたんに</label><br>
            <input type="radio" id="k" name="answer3" value="k">
            <label for="k">C. とだんに</label><br>
            <input type="radio" id="l" name="answer3" value="l">
            <label for="l">D. とだんに</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题四</h1>
        </div>
        <p>スピーチ大会の司会を【務める】。</p>
        <div class="answer-options">
            <input type="radio" id="m" name="answer4" value="m">
            <label for="m">A. まとめる</label><br>
            <input type="radio" id="n" name="answer4" value="n">
            <label for="n">B. やめる</label><br>
            <input type="radio" id="o" name="answer4" value="o">
            <label for="o">C. やめる</label><br>
            <input type="radio" id="p" name="answer4" value="p">
            <label for="p">D. っとめる</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题五</h1>
        </div>
        <p>これは特別な【素材】で作られているそうた。</p>
        <div class="answer-options">
            <input type="radio" id="q" name="answer5" value="q">
            <label for="q">A. そうざい</label><br>
            <input type="radio" id="r" name="answer5" value="r">
            <label for="r">B. すざい</label><br>
            <input type="radio" id="s" name="answer5" value="s">
            <label for="s">C. そざい</label><br>
            <input type="radio" id="t" name="answer5" value="t">
            <label for="t">D. すうざい</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题六</h1>
        </div>
        <p>いつのまにか太陽が【のぼって】いた。</p>
        <div class="answer-options">
            <input type="radio" id="u" name="answer6" value="u">
            <label for="u">A. 去って</label><br>
            <input type="radio" id="v" name="answer6" value="v">
            <label for="v">B. 至って</label><br>
            <input type="radio" id="w" name="answer6" value="w">
            <label for="w">C. 昇って</label><br>
            <input type="radio" id="x" name="answer6" value="x">
            <label for="x">D. 照って</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题七</h1>
        </div>
        <p>【すいちょく】に線を引く。</p>
        <div class="answer-options">
            <input type="radio" id="y" name="answer7" value="y">
            <label for="y">A. 乗頂</label><br>
            <input type="radio" id="z" name="answer7" value="z">
            <label for="z">B. 乗直</label><br>
            <input type="radio" id="aa" name="answer7" value="aa">
            <label for="aa">C. 垂頂</label><br>
            <input type="radio" id="ab" name="answer7" value="ab">
            <label for="ab">D. 垂直</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题八</h1>
        </div>
        <p>研修生を受け入れるためには、【じゅうきょ】を確保する必要がある。</p>
        <div class="answer-options">
            <input type="radio" id="ac" name="answer8" value="ac">
            <label for="ac">A. 住宅</label><br>
            <input type="radio" id="ad" name="answer8" value="ad">
            <label for="ad">B. 住居</label><br>
            <input type="radio" id="ae" name="answer8" value="ae">
            <label for="ae">C. 住家</label><br>
            <input type="radio" id="af" name="answer8" value="af">
            <label for="af">D. 住屋</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题九</h1>
        </div>
        <p>災害に【そなえる】ことはとても大切た。</p>
        <div class="answer-options">
            <input type="radio" id="ag" name="answer9" value="ag">
            <label for="ag">A. 備える</label><br>
            <input type="radio" id="ah" name="answer9" value="ah">
            <label for="ah">B. 準える</label><br>
            <input type="radio" id="ai" name="answer9" value="ai">
            <label for="ai">C. 策える</label><br>
            <input type="radio" id="aj" name="answer9" value="aj">
            <label for="aj">D. 防える</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十</h1>
        </div>
        <p>【てんけいてき】な例を挙げて説明した。</p>
        <div class="answer-options">
            <input type="radio" id="ak" name="answer10" value="ak">
            <label for="ak">A. 点形的 </label><br>
            <input type="radio" id="al" name="answer10" value="al">
            <label for="al">B. 典形的</label><br>
            <input type="radio" id="am" name="answer10" value="am">
            <label for="am">C. 点型的</label><br>
            <input type="radio" id="an" name="answer10" value="an">
            <label for="an">D. 典型的</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十一</h1>
        </div>
        <p>( )分野の人と話すのはいい刺激になる。</p>
        <div class="answer-options">
            <input type="radio" id="ao" name="answer11" value="ao">
            <label for="ao">A. 逆</label><br>
            <input type="radio" id="ap" name="answer11" value="ap">
            <label for="ap">B. 異</label><br>
            <input type="radio" id="aq" name="answer11" value="aq">
            <label for="aq">C. 副</label><br>
            <input type="radio" id="ar" name="answer11" value="ar">
            <label for="ar">D. 裏</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十二</h1>
        </div>
        <p>その店は、よい品物を（)価格で売っている。</p>
        <div class="answer-options">
            <input type="radio" id="as" name="answer12" value="as">
            <label for="as">A. 半</label><br>
            <input type="radio" id="at" name="answer12" value="at">
            <label for="at">B. 安</label><br>
            <input type="radio" id="au" name="answer12" value="au">
            <label for="au">C. 小</label><br>
            <input type="radio" id="av" name="answer12" value="av">
            <label for="av">D. 低</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十三</h1>
        </div>
        <p>運転免許証なと、顔写真(	)の身分証明書を見せてください。</p>
        <div class="answer-options">
            <input type="radio" id="aw" name="answer13" value="aw">
            <label for="aw">A. 足し</label><br>
            <input type="radio" id="ax" name="answer13" value="ax">
            <label for="ax">B. 載せ</label><br>
            <input type="radio" id="ay" name="answer13" value="ay">
            <label for="ay">C. 付き</label><br>
            <input type="radio" id="az" name="answer13" value="az">
            <label for="az">D. 含み</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十四</h1>
        </div>
        <p>職場環境の問題については、会社との( )の結果、改善してもらえることになった。</p>
        <div class="answer-options">
            <input type="radio" id="ba" name="answer14" value="ba">
            <label for="ba">A. 交渉</label><br>
            <input type="radio" id="bb" name="answer14" value="bb">
            <label for="bb">B. 授受</label><br>
            <input type="radio" id="bc" name="answer14" value="bc">
            <label for="bc">C. 通話</label><br>
            <input type="radio" id="bd" name="answer14" value="bd">
            <label for="bd">D. 出願</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十五</h1>
        </div>
        <p>この企画を成功させるには、いくつもの課題を( )しなければならない。</p>
        <div class="answer-options">
            <input type="radio" id="be" name="answer15" value="be">
            <label for="a">A. キャンセル </label><br>
            <input type="radio" id="bf" name="answer15" value="bf">
            <label for="bf">B. クリア </label><br>
            <input type="radio" id="bg" name="answer15" value="bg">
            <label for="bg">C. カット </label><br>
            <input type="radio" id="bh" name="answer15" value="bh">
            <label for="bh">D. ブッシュ</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十六</h1>
        </div>
        <p>このカメラは小型だが、通常のモデ丿しに比べて性能が( )いるわけではない。</p>
        <div class="answer-options">
            <input type="radio" id="bi" name="answer16" value="bi">
            <label for="bi">A. 縮んで</label><br>
            <input type="radio" id="bj" name="answer16" value="bj">
            <label for="bj">B. 荒れて</label><br>
            <input type="radio" id="bk" name="answer16" value="bk">
            <label for="bk">C. 沈んで</label><br>
            <input type="radio" id="bl" name="answer16" value="bl">
            <label for="bl">D. 劣って</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十七</h1>
        </div>
        <p>父は手術後、医者も驚くほど(	)回復した。</p>
        <div class="answer-options">
            <input type="radio" id="bm" name="answer17" value="bm">
            <label for="bm">A. 劇的に</label><br>
            <input type="radio" id="bn" name="answer17" value="bn">
            <label for="bn">B. 格別に</label><br>
            <input type="radio" id="bo" name="answer17" value="bo">
            <label for="bo">C. 真剣に</label><br>
            <input type="radio" id="bp" name="answer17" value="bp">
            <label for="bp">D. 強大に</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十八</h1>
        </div>
        <p>このシステムを利用するには、インターネットに( )しているパソコンが必要です。</p>
        <div class="answer-options">
            <input type="radio" id="bq" name="answer18" value="bq">
            <label for="bq">A. 到達</label><br>
            <input type="radio" id="br" name="answer18" value="br">
            <label for="br">B. 付属</label><br>
            <input type="radio" id="bs" name="answer18" value="bs">
            <label for="c">C. 接続</label><br>
            <input type="radio" id="bt" name="answer18" value="bt">
            <label for="bt">D. 密着</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题十九</h1>
        </div>
        <p>アルバイトの募集は3月末で(	)ので、もう応募はできません。</p>
        <div class="answer-options">
            <input type="radio" id="bu" name="answer19" value="bu">
            <label for="bu">A. 取り払った</label><br>
            <input type="radio" id="bv" name="answer19" value="bv">
            <label for="bv">B. 打ち消した</label><br>
            <input type="radio" id="bw" name="answer19" value="bw">
            <label for="bw">C. 締め切った</label><br>
            <input type="radio" id="bx" name="answer19" value="bx">
            <label for="bx">D. 引き離した</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二十</h1>
        </div>
        <p>ガイドの後ろをツアー客たちが、（	)ついて歩いている。</p>
        <div class="answer-options">
            <input type="radio" id="by" name="answer20" value="by">
            <label for="by">A. ごくごく</label><br>
            <input type="radio" id="bz" name="answer20" value="bz">
            <label for="bz">B. ぞろぞろ</label><br>
            <input type="radio" id="ca" name="answer20" value="ca">
            <label for="ca">C. ぎしぎし </label><br>
            <input type="radio" id="cb" name="answer20" value="cb">
            <label for="cb">D. じめじめ</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二十一</h1>
        </div>
        <p>衝突しそうになってしまった。</p>
        <div class="answer-options">
            <input type="radio" id="cc" name="answer21" value="cc">
            <label for="cc">A. ぶつかりそう</label><br>
            <input type="radio" id="cd" name="answer21" value="cd">
            <label for="cd">B. 落ちそう</label><br>
            <input type="radio" id="ce" name="answer21" value="ce">
            <label for="ce">C. 壊しそう</label><br>
            <input type="radio" id="cf" name="answer21" value="cf">
            <label for="cf">D. 破りそう</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二十二</h1>
        </div>
        <p>彼には再三お願いしているんです。</p>
        <div class="answer-options">
            <input type="radio" id="cg" name="answer22" value="cg">
            <label for="cg">A. たまに</label><br>
            <input type="radio" id="ch" name="answer22" value="ch">
            <label for="ch">B. 何度か</label><br>
            <input type="radio" id="ci" name="answer22" value="ci">
            <label for="ci">C. 何度も</label><br>
            <input type="radio" id="cj" name="answer22" value="cj">
            <label for="cj">D. いつも</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二十三</h1>
        </div>
        <p>彼が言っていることはでたらめだ。</p>
        <div class="answer-options">
            <input type="radio" id="ck" name="answer23" value="ck">
            <label for="ck">A. 悪口</label><br>
            <input type="radio" id="cl" name="answer23" value="cl">
            <label for="cl">B. わがまま</label><br>
            <input type="radio" id="cm" name="answer23" value="cm">
            <label for="cm">C. うそ</label><br>
            <input type="radio" id="cn" name="answer23" value="cn">
            <label for="cn">D. 自慢</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二十四</h1>
        </div>
        <p>すみません、お勘定をお願いします。</p>
        <div class="answer-options">
            <input type="radio" id="co" name="answer24" value="co">
            <label for="co">A. 注文</label><br>
            <input type="radio" id="cp" name="answer24" value="cp">
            <label for="cp">B. 会計</label><br>
            <input type="radio" id="cq" name="answer24" value="cq">
            <label for="cq">C. 予約</label><br>
            <input type="radio" id="cr" name="answer24" value="cr">
            <label for="cr">D. 配達</label><br>
        </div>
    </div>

    <div class="question-container">
        <div class="header">
            <h1>问题二十五</h1>
        </div>
        <p>今日は、犬がいつもよりさわがしい。</p>
        <div class="answer-options">
            <input type="radio" id="cs" name="answer25" value="cs">
            <label for="cs">A. 悲しそうだ</label><br>
            <input type="radio" id="ct" name="answer25" value="ct">
            <label for="ct">B. 静かだ</label><br>
            <input type="radio" id="cu" name="answer25" value="cu">
            <label for="cu">C. 楽しそうだ</label><br>
            <input type="radio" id="cv" name="answer25" value="cv">
            <label for="cv">D. うるさい</label><br>
        </div>
    </div>

    <div class="submit-button-container">
        <button id="submit-button">提交</button>
    </div>

    <div class="result-container">
        <p>你做对了<span id="result">0</span>道题！</p>
    </div>
</div>

<script>
    // 获取页面元素
    const submitButton = document.getElementById("submit-button");
    const answerOptions1 = document.getElementsByName("answer1");
    const answerOptions2 = document.getElementsByName("answer2");
    const answerOptions3 = document.getElementsByName("answer3");
    const answerOptions4 = document.getElementsByName("answer4");
    const answerOptions5 = document.getElementsByName("answer5");
    const answerOptions6 = document.getElementsByName("answer6");
    const answerOptions7 = document.getElementsByName("answer7");
    const answerOptions8 = document.getElementsByName("answer8");
    const answerOptions9 = document.getElementsByName("answer9");
    const answerOptions10 = document.getElementsByName("answer10");
    const answerOptions11 = document.getElementsByName("answer11");
    const answerOptions12 = document.getElementsByName("answer12");
    const answerOptions13 = document.getElementsByName("answer13");
    const answerOptions14 = document.getElementsByName("answer14");
    const answerOptions15 = document.getElementsByName("answer15");
    const answerOptions16 = document.getElementsByName("answer16");
    const answerOptions17 = document.getElementsByName("answer17");
    const answerOptions18 = document.getElementsByName("answer18");
    const answerOptions19 = document.getElementsByName("answer19");
    const answerOptions20 = document.getElementsByName("answer20");
    const answerOptions21 = document.getElementsByName("answer21");
    const answerOptions22 = document.getElementsByName("answer22");
    const answerOptions23 = document.getElementsByName("answer23");
    const answerOptions24 = document.getElementsByName("answer24");
    const answerOptions25 = document.getElementsByName("answer25");

    const result = document.getElementById("result");

    let correctAnswers = 0; // 初始化做对题数为0

    // 点击提交按钮后的操作
    submitButton.addEventListener("click", () => {
        // 判断第一题的答案是否正确
        let answer1 = "a";
        for (let i = 0; i < answerOptions1.length; i++) {
            if (answerOptions1[i].checked) {
                answer1 = answerOptions1[i].value;
                break;
            }
        }
        if (answer1 === "d") {
            correctAnswers++;
        }

        // 判断第二题的答案是否正确
        let answer2 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer2 = answerOptions2[i].value;
                break;
            }
        }
        if (answer2 === "f") {
            correctAnswers++;
        }

        let answer3 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer3 = answerOptions2[i].value;
                break;
            }
        }
        if (answer3 === "i") {
            correctAnswers++;
        }

        let answer4 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer4 = answerOptions2[i].value;
                break;
            }
        }
        if (answer4 === "p") {
            correctAnswers++;
        }

        let answer5 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer5 = answerOptions2[i].value;
                break;
            }
        }
        if (answer5 === "s") {
            correctAnswers++;
        }

        let answer6 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer6 = answerOptions2[i].value;
                break;
            }
        }
        if (answer6 === "w") {
            correctAnswers++;
        }

        let answer7 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer7 = answerOptions2[i].value;
                break;
            }
        }
        if (answer7 === "ab") {
            correctAnswers++;
        }

        let answer8 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer8 = answerOptions2[i].value;
                break;
            }
        }
        if (answer8 === "ad") {
            correctAnswers++;
        }

        let answer9 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer9 = answerOptions2[i].value;
                break;
            }
        }
        if (answer9 === "ag") {
            correctAnswers++;
        }

        let answer10 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer10 = answerOptions2[i].value;
                break;
            }
        }
        if (answer10 === "an") {
            correctAnswers++;
        }

        let answer11 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer11 = answerOptions2[i].value;
                break;
            }
        }
        if (answer11 === "ap") {
            correctAnswers++;
        }

        let answer12 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer12 = answerOptions2[i].value;
                break;
            }
        }
        if (answer12 === "av") {
            correctAnswers++;
        }

        let answer13 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer13 = answerOptions2[i].value;
                break;
            }
        }
        if (answer13 === "ay") {
            correctAnswers++;
        }

        let answer14 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer14 = answerOptions2[i].value;
                break;
            }
        }
        if (answer14 === "ba") {
            correctAnswers++;
        }

        let answer15 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer15 = answerOptions2[i].value;
                break;
            }
        }
        if (answer15 === "bf") {
            correctAnswers++;
        }

        let answer16 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer16 = answerOptions2[i].value;
                break;
            }
        }
        if (answer16 === "bl") {
            correctAnswers++;
        }

        let answer17 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer17 = answerOptions2[i].value;
                break;
            }
        }
        if (answer17 === "bm") {
            correctAnswers++;
        }

        let answer18 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer18 = answerOptions2[i].value;
                break;
            }
        }
        if (answer18 === "bs") {
            correctAnswers++;
        }

        let answer19 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer19 = answerOptions2[i].value;
                break;
            }
        }
        if (answer19 === "bw") {
            correctAnswers++;
        }

        let answer20 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer20 = answerOptions2[i].value;
                break;
            }
        }
        if (answer20 === "bz") {
            correctAnswers++;
        }

        let answer21 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer21 = answerOptions2[i].value;
                break;
            }
        }
        if (answer21 === "cc") {
            correctAnswers++;
        }

        let answer22 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer22 = answerOptions2[i].value;
                break;
            }
        }
        if (answer22 === "ci") {
            correctAnswers++;
        }

        let answer23 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer23 = answerOptions2[i].value;
                break;
            }
        }
        if (answer23 === "cm") {
            correctAnswers++;
        }

        let answer24 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer24 = answerOptions2[i].value;
                break;
            }
        }
        if (answer24 === "cp") {
            correctAnswers++;
        }

        let answer25 = "";
        for (let i = 0; i < answerOptions2.length; i++) {
            if (answerOptions2[i].checked) {
                answer25 = answerOptions2[i].value;
                break;
            }
        }
        if (answer25 === "cv") {
            correctAnswers++;
        }

        // 在结果框中显示做对的题数
        result.textContent = correctAnswers;

        // 重置正确答案数量
        correctAnswers = 0;

        // 重置表单
        document.querySelector("form").reset();
    });

</script>
</body>
</html>

